package 常用方法;

public class equals判断两个是否相等 {
    public static void main(String[] args) {
        String str1 = "hello";
        String str2 = "hello";
        System.out.println(str1.equals(str2));//true
        System.out.println("hahahaha".equals("hehehehe"));//false


    }
}
